﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Cool.Application.System.MenuService.Dtos;
using Cool.Core.ComDto;
using Cool.Core.Entities.System;

namespace Cool.Application.System.MenuService
{
    public interface IMenuService
    {
        /// <summary>
        /// 当前登录人菜单权限获取
        /// </summary>
        /// <returns></returns>
        List<MenuOutDto> GetMenus();

        /// <summary>
        /// 获取所有权限树列表
        /// </summary>
        /// <returns></returns>
        Task<List<TreeOutData>> GetTreeSelect();

        /// <summary>
        /// 根据角色ID查询菜单下拉树结构
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<dynamic> GetRoleMenuTreeSelect(int roleId);

        #region 配置页面接口

        /// <summary>
        /// 查询菜单列表
        /// </summary>
        /// <returns></returns>
        Task<List<MenuTreeTableReturnDto>> GetListAsync(MenuTreeTableSearchDto menuTreeTableSearchDto);

        /// <summary>
        /// 查询菜单详细
        /// </summary>
        /// <param name="menuId"></param>
        /// <returns></returns>
        Task<SysMenu> GetAsync(int menuId);


        /// <summary>
        /// 新增菜单
        /// </summary>
        /// <param name="menu"></param>
        Task<SysMenu> AddAsync(SysMenu menu);

        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="menu"></param>
        Task UpdateAsync(SysMenu menu);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="menuId"></param>
        Task DeleteAsync(int menuId);

        #endregion

    }
}
